package com.ruoyi.pointRecord.domain;

import java.time.LocalDate;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 积分兑换记录对象 points_exchange_record
 * 
 * @author amy
 * @date 2025-06-17
 */
@Schema(description = "积分兑换记录对象")
public class PointsExchangeRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    /** 自增ID */
    @Schema(title = "自增ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 逻辑主键-兑换记录编码 */
    @Schema(title = "逻辑主键-兑换记录编码")
    private String exchangeCode;

    /** 用户ID */
    @Schema(title = "用户ID")
    @Excel(name = "用户ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /** 商品ID */
    @Schema(title = "商品ID")
    @Excel(name = "商品ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long productId;

    /** 商品名称 */
    @Schema(title = "商品名称")
    @Excel(name = "商品名称")
    private String productName;

    /** 商品图片 */
    @Schema(title = "商品图片")
    @Excel(name = "商品图片")
    private String productImage;

    /** 消耗积分 */
    @Schema(title = "消耗积分")
    @Excel(name = "消耗积分")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long pointsCost;

    /** 兑换数量 */
    @Schema(title = "兑换数量")
    @Excel(name = "兑换数量")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long exchangeQuantity;

    /** 兑换时间 */
    @Schema(title = "兑换时间")
    @Excel(name = "兑换时间")
    private LocalDate exchangeTime;

    /** 收货地址 */
    @Schema(title = "收货地址")
    @Excel(name = "收货地址")
    private String deliveryAddress;

    /** 联系电话 */
    @Schema(title = "联系电话")
    @Excel(name = "联系电话")
    private String contactPhone;

    /** 兑换状态 */
    @Schema(title = "兑换状态")
    @Excel(name = "兑换状态")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long exchangeStatus;

    /** 物流追踪号 */
    @Schema(title = "物流追踪号")
    @Excel(name = "物流追踪号")
    private String trackingNumber;

    /** 物流公司 */
    @Schema(title = "物流公司")
    @Excel(name = "物流公司")
    private String logisticsCompany;

    /** 发货时间 */
    @Schema(title = "发货时间")
    @Excel(name = "发货时间")
    private LocalDate deliveryTime;

    /** 完成时间 */
    @Schema(title = "完成时间")
    @Excel(name = "完成时间")
    private LocalDate completionTime;

    /** 取消原因 */
    @Schema(title = "取消原因")
    @Excel(name = "取消原因")
    private String cancelReason;

    /** 创建人 */
    @Schema(title = "创建人")
    private String createdBy;

    /** 创建时间 */
    @Schema(title = "创建时间")
    private LocalDate createdTime;

    /** 更新人 */
    @Schema(title = "更新人")
    private String updatedBy;

    /** 更新时间 */
    @Schema(title = "更新时间")
    private LocalDate updatedTime;

    /** 删除标志 0-未删除 1-已删除 */
    @Schema(title = "删除标志 0-未删除 1-已删除")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deletedFlag;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }


    public void setExchangeCode(String exchangeCode) 
    {
        this.exchangeCode = exchangeCode;
    }

    public String getExchangeCode() 
    {
        return exchangeCode;
    }


    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }


    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }


    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }


    public void setProductImage(String productImage) 
    {
        this.productImage = productImage;
    }

    public String getProductImage() 
    {
        return productImage;
    }


    public void setPointsCost(Long pointsCost) 
    {
        this.pointsCost = pointsCost;
    }

    public Long getPointsCost() 
    {
        return pointsCost;
    }


    public void setExchangeQuantity(Long exchangeQuantity) 
    {
        this.exchangeQuantity = exchangeQuantity;
    }

    public Long getExchangeQuantity() 
    {
        return exchangeQuantity;
    }


    public void setExchangeTime(LocalDate exchangeTime) 
    {
        this.exchangeTime = exchangeTime;
    }

    public LocalDate getExchangeTime() 
    {
        return exchangeTime;
    }


    public void setDeliveryAddress(String deliveryAddress) 
    {
        this.deliveryAddress = deliveryAddress;
    }

    public String getDeliveryAddress() 
    {
        return deliveryAddress;
    }


    public void setContactPhone(String contactPhone) 
    {
        this.contactPhone = contactPhone;
    }

    public String getContactPhone() 
    {
        return contactPhone;
    }


    public void setExchangeStatus(Long exchangeStatus) 
    {
        this.exchangeStatus = exchangeStatus;
    }

    public Long getExchangeStatus() 
    {
        return exchangeStatus;
    }


    public void setTrackingNumber(String trackingNumber) 
    {
        this.trackingNumber = trackingNumber;
    }

    public String getTrackingNumber() 
    {
        return trackingNumber;
    }


    public void setLogisticsCompany(String logisticsCompany) 
    {
        this.logisticsCompany = logisticsCompany;
    }

    public String getLogisticsCompany() 
    {
        return logisticsCompany;
    }


    public void setDeliveryTime(LocalDate deliveryTime) 
    {
        this.deliveryTime = deliveryTime;
    }

    public LocalDate getDeliveryTime() 
    {
        return deliveryTime;
    }


    public void setCompletionTime(LocalDate completionTime) 
    {
        this.completionTime = completionTime;
    }

    public LocalDate getCompletionTime() 
    {
        return completionTime;
    }


    public void setCancelReason(String cancelReason) 
    {
        this.cancelReason = cancelReason;
    }

    public String getCancelReason() 
    {
        return cancelReason;
    }


    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }


    public void setCreatedTime(LocalDate createdTime) 
    {
        this.createdTime = createdTime;
    }

    public LocalDate getCreatedTime() 
    {
        return createdTime;
    }


    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }


    public void setUpdatedTime(LocalDate updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public LocalDate getUpdatedTime() 
    {
        return updatedTime;
    }


    public void setDeletedFlag(Long deletedFlag) 
    {
        this.deletedFlag = deletedFlag;
    }

    public Long getDeletedFlag() 
    {
        return deletedFlag;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("exchangeCode", getExchangeCode())
            .append("userId", getUserId())
            .append("productId", getProductId())
            .append("productName", getProductName())
            .append("productImage", getProductImage())
            .append("pointsCost", getPointsCost())
            .append("exchangeQuantity", getExchangeQuantity())
            .append("exchangeTime", getExchangeTime())
            .append("deliveryAddress", getDeliveryAddress())
            .append("contactPhone", getContactPhone())
            .append("exchangeStatus", getExchangeStatus())
            .append("trackingNumber", getTrackingNumber())
            .append("logisticsCompany", getLogisticsCompany())
            .append("deliveryTime", getDeliveryTime())
            .append("completionTime", getCompletionTime())
            .append("cancelReason", getCancelReason())
            .append("remark", getRemark())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .append("deletedFlag", getDeletedFlag())
            .toString();
    }
}
